#ifndef __PID_H__
#define __PID_H__

struct PID
{
	float err; 
	float err_last; 
	float Kp,Ki,Kd;
	float output;
	float integral;
	float err_next;
};


void pid_init(struct PID * pid, float p, float i, float d);
float pid_update(struct PID * pid, float set, float actual);


#endif

